package com.hn.shopadmin.common;

import com.hn.shopadmin.dto.Test;
import org.springframework.beans.BeanUtils;

public class TestMain {
    public static void tt(){
        Test.Tt tt = new Test().creatTt();
        tt.setName("张三");

        Test.Tt tt1 = new Test().creatTt();
        BeanUtils.copyProperties(tt, tt1);
        tt1.setId("1");
        System.out.println("tt1:" + tt1.toString());

        Test.Tt tt2 = new Test().creatTt();
        BeanUtils.copyProperties(tt, tt2);
        System.out.println(tt.toString());
        tt2.setSex("男");
        System.out.println("tt1:" + tt1.toString());
        System.out.println("tt2:" + tt2.toString());

        Test test = new Test();
        test.addTt(tt1);
        test.addTt(tt2);

        System.out.println(test);

    }

    public static void main(String[] args) {
        tt();
    }
}
